<template>
    <div class="classDetail">
        <div class="titleBox">
            班级管理
        </div>

        <div class="topBox">
            <div class="typelist_Box">
                <div class="type_item" v-for="(item, index) in typeList" :key="index" @click="handletypeCurrindex(index)">
                    <div :class="{ 'type_itemed': typeCurrindex == index }">
                        {{ item }}
                    </div>
                    <div v-if="typeCurrindex == index" class="heng"></div>
                </div>
            </div>

            <div v-if="typeCurrindex == 0" class="screen_Content">
                <div class="screen_box">
                    <div class="lable">
                        时间：
                    </div>
                    <div class="screen_cintent">
                        <div class="cintentitem" :class="{ cintentitemed: dayCurrindex == index }"
                            v-for="(item, index) in dayList" :key="index" @click="handleChangeday(index)">
                            {{ item.name }}
                        </div>
                    </div>
                </div>

                <div class="screen_box">
                    <div class="lable">
                        完成度：
                    </div>
                    <div class="screen_cintent">
                        <div class="cintentitem" :class="{ cintentitemed: completeCurrindex == index }"
                            v-for="(item, index) in completeList" :key="index" @click="handleChangecintent(index)">
                            {{ item.name }}
                        </div>
                    </div>
                </div>
            </div>


            <div v-if="typeCurrindex == 1" class="reportScreen">

                <div class="reportScreen_left">
                    <div class="dateContent">
                        <div class="lable">
                            日历筛选：
                        </div>
                        <div>
                            <el-date-picker v-model="value1" type="date" placeholder="选择日期">
                            </el-date-picker>
                        </div>
                    </div>

                    <div>
                        <el-input placeholder="请输入" suffix-icon="el-icon-search" v-model="input1">
                        </el-input>
                    </div>

                </div>

                <div class="btn">
                    查询
                </div>
            </div>
            <div v-if="typeCurrindex == 3" class="screen_Content">
                <div class="screen_box">
                    <div class="lable">
                        时间：
                    </div>
                    <div class="screen_cintent">
                        <div class="cintentitem" :class="{ cintentitemed: listeninCurrindex == index }"
                            v-for="(item, index) in dayList" :key="index" @click="handleChangelistenin(index)">
                            {{ item.name }}
                        </div>
                    </div>
                </div>

                <div class="dateContent">
                    <div>日期筛选：</div>
                    <el-date-picker v-model="stardate" type="date" placeholder="开始日期">
                    </el-date-picker>
                    <el-date-picker v-model="enddate" type="date" placeholder="结束日期">
                    </el-date-picker>
                </div>

                <div class="btn">
                    查询
                </div>

            </div>
            <div v-if="typeCurrindex == 5 || typeCurrindex == 6" class="screen_Content">
                <div class="screen_box">
                    <div class="lable">
                        时间：
                    </div>
                    <div class="screen_cintent">
                        <div class="cintentitem" :class="{ cintentitemed: libraryCurrindex == index }"
                            v-for="(item, index) in dayList" :key="index" @click="handleChangelibrary(index)">
                            {{ item.name }}
                        </div>
                    </div>
                </div>
            </div>

            <div v-if="typeCurrindex == 7" class="screen_Content">
                <div style="display: flex;align-items: center;">
                    <el-input v-model="studentName" placeholder="请输入学生姓名"></el-input>
                    <div class="btn" style="margin-left: 30px;">查询</div>
                </div>
            </div>

        </div>

        <!-- 练习 -->
        <div v-if="typeCurrindex == 0">
            <practice></practice>
        </div>

        <!-- 考试报告 -->
        <div v-if="typeCurrindex == 1">
            <examinationReport></examinationReport>
        </div>

        <!-- 单词本 -->
        <div v-if="typeCurrindex == 2">
            <vocabularyBook></vocabularyBook>
        </div>

        <!-- 听力练习 -->
        <div v-if="typeCurrindex == 3">
            <listeningPractice></listeningPractice>
        </div>

        <!-- 词汇冲关 -->
        <div v-if="typeCurrindex == 4">
            <lexicalChongguan></lexicalChongguan>
        </div>

        <!-- 图书馆统计 -->
        <div v-if="typeCurrindex == 5">
            <libraryStatistics></libraryStatistics>
        </div>

        <!-- 星星金币 -->
        <div v-if="typeCurrindex == 6">
            <starAndcoin></starAndcoin>
        </div>

        <!-- 学生 -->
        <div v-if="typeCurrindex == 7">
            <student></student>
        </div>

    </div>
</template>
<script>
import practice from "./practice.vue"
import examinationReport from "./examinationReport.vue"
import vocabularyBook from "./vocabularyBook/index.vue"
import listeningPractice from "./listeningPractice.vue"
import lexicalChongguan from "./lexicalChongguan.vue"
import libraryStatistics from "@/views/classManagement/libraryStatistics/index.vue"
import starAndcoin from "./starAndcoin.vue"
import student from "@/views/classManagement/student/index.vue"
export default {
    components: {
        practice,
        examinationReport,
        vocabularyBook,
        listeningPractice,
        lexicalChongguan,
        libraryStatistics,
        starAndcoin,
        student
    },
    data() {
        return {
            typeList: [
                '练习', '考试报告', '单词本', '听力练习', '词汇冲关', '图书馆统计', '星星金币', '学生',
            ],
            typeCurrindex: 0,
            dayList: [{ name: '全部', id: 0 }, { name: '本周', id: 1 }, { name: '上周', id: 2 }, { name: '本月', id: 3 },],
            completeList: [
                { name: '全部', id: 0 }, { name: '未完成', id: 1 }, { name: '已完成', id: 2 },
            ],
            dayCurrindex: 0,
            completeCurrindex: 0,
            value1: '',
            listeninCurrindex: 0,
            stardate: "",
            enddate: "",
            libraryCurrindex: 0,
            studentName: "",
        }
    },
    created() {

    },
    mounted() {

    },
    methods: {
        handletypeCurrindex(index) {
            this.typeCurrindex = index
        },
        handleChangeday(value) {
            this.dayCurrindex = value
        },
        handleChangecintent(value) {
            this.completeCurrindex = value
        },
        handleChangelistenin(value) {
            this.listeninCurrindex = value
        },
        handleChangelibrary(value) {
            this.libraryCurrindex = value
        },

    }
}
</script>
<style scoped lang="scss">
.classDetail {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;

    .titleBox {
        font-family: Alibaba PuHuiTi, Alibaba PuHuiTi;
        font-weight: 400;
        font-size: 14px;
        color: #777777;
        line-height: 16px;
    }

    .topBox {
        width: 100%;
        padding: 19px;
        box-sizing: border-box;
        background-color: #ffffff;
        margin-top: 16px;
        border-radius: 4px 4px 4px 4px;

        .typelist_Box {

            display: flex;

            .type_item {
                font-family: PingFang SC, PingFang SC;
                font-weight: 400;
                font-size: 16px;
                color: #535D6D;
                line-height: 19px;
                margin-right: 28px;
                cursor: pointer;
                display: flex;
                flex-direction: column;
                align-items: center;

                .type_itemed {
                    color: #4BA840;
                }

                .heng {
                    width: 24px;
                    height: 2px;
                    background: #4BA840;
                    border-radius: 8px 8px 8px 8px;
                    margin-top: 4px;
                }
            }
        }

        .screen_Content {
            margin-top: 36px;
            display: flex;
            align-items: center;

            .screen_box {
                display: flex;
                align-items: center;
                margin-right: 80px;

                .lable {
                    font-family: PingFang SC, PingFang SC;
                    font-weight: 400;
                    font-size: 12px;
                    color: #777777;
                    line-height: 14px;
                }

                .screen_cintent {
                    display: flex;
                    align-items: center;
                    margin-left: 10px;

                    .cintentitem {
                        width: 68px;
                        height: 34px;
                        border-radius: 0px 0px 0px 0px;
                        border: 1px solid #777777;
                        font-family: PingFang SC, PingFang SC;
                        font-weight: 400;
                        font-size: 12px;
                        color: #777777;
                        line-height: 34px;
                        text-align: center;
                        cursor: pointer;
                    }

                    .cintentitem:first-child {
                        border-radius: 4px 0px 0px 4px;
                    }

                    .cintentitem:last-child {
                        border-radius: 0px 4px 4px 0px;
                    }

                    .cintentitemed {
                        background: #EAF9E8;
                        border: 1px solid #4BA840;
                        color: #4BA840;
                    }

                }
            }

            .dateContent {
                display: flex;
                align-items: center;
                font-family: PingFang SC, PingFang SC;
                font-weight: 400;
                font-size: 12px;
                color: #777777;
                line-height: 14px;
            }

            .btn {
                width: 74px;
                height: 34px;
                background: #4BA840;
                border-radius: 4px 4px 4px 4px;
                font-family: PingFang SC, PingFang SC;
                font-weight: 500;
                font-size: 14px;
                color: #FFFFFF;
                line-height: 34px;
                text-align: center;
                cursor: pointer;
            }
        }

        .reportScreen {
            width: 90%;
            margin-top: 23px;
            display: flex;
            align-items: center;
            justify-content: space-between;

            .reportScreen_left {
                display: flex;
                align-items: center;

                .dateContent {
                    display: flex;
                    align-items: center;
                    margin-right: 30px;

                    .lable {
                        font-family: PingFang SC, PingFang SC;
                        font-weight: 400;
                        font-size: 12px;
                        color: #777777;
                        line-height: 14px;
                    }
                }
            }

            .btn {
                width: 74px;
                height: 34px;
                background: #4BA840;
                border-radius: 4px 4px 4px 4px;
                font-family: PingFang SC, PingFang SC;
                font-weight: 500;
                font-size: 14px;
                color: #FFFFFF;
                line-height: 34px;
                text-align: center;
                cursor: pointer;
            }

        }


    }


}


::v-deep .el-input__inner:active {
    border: 1px solid #4BA840;
}

::v-deep .el-input__inner:focus {
    border: 1px solid #4BA840;
}

::v-deep .el-select .el-input.is-focus .el-input__inner {
    border: 1px solid #4BA840;
}

::v-deep .el-form-item__label {
    font-family: PingFang SC, PingFang SC;
    font-weight: 400;
    font-size: 12px;
    color: #777777;
}

::v-deep .el-form-item__content {
    line-height: 20px;

}

::v-deep .el-form-item__label {
    line-height: 20px;

}

::v-deep .el-input .el-input__inner {
    width: 179px;
    height: 35px !important;
    border-radius: 4px 4px 4px 4px;
    font-family: PingFang SC, PingFang SC;
    font-weight: 400;
    font-size: 12px;
    line-height: 14px;
}
</style>